<!DOCTYPE html>
<html lang="zh" dir="ltr" class="client-nojs">
<head>
<title>异常</title>
<meta charset="UTF-8">
<meta name="generator" content="MediaWiki 1.21.2">
<link rel="shortcut icon" href="../../../common/favicon.ico">
<link rel="stylesheet" href="../../../common/ext.css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" href="../../../common/site_modules.css">
<style>a:lang(ar),a:lang(ckb),a:lang(fa),a:lang(kk-arab),a:lang(mzn),a:lang(ps),a:lang(ur){text-decoration:none}#toc{display:none}.editsection{display:none}
/* cache key: mwiki1-mwiki_zh_:resourceloader:filter:minify-css:7:15cea3ec788a65b5187d4018eed543bf */</style>

<script src="../../../common/startup_scripts.js"></script>
<script>if(window.mw){
mw.config.set({"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"cpp/language/exceptions","wgTitle":"cpp/language/exceptions","wgCurRevisionId":64872,"wgArticleId":8568,"wgIsArticle":true,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgBreakFrames":false,"wgPageContentLanguage":"zh","wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"zh","wgMonthNames":["","1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"wgMonthNamesShort":["","1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"wgRelevantPageName":"cpp/language/exceptions","wgUserVariant":"zh","wgRestrictionEdit":[],"wgRestrictionMove":[]});
}</script><script>if(window.mw){
mw.loader.implement("user.options",function(){mw.user.options.set({"ccmeonemails":0,"cols":80,"date":"default","diffonly":0,"disablemail":0,"disablesuggest":0,"editfont":"default","editondblclick":0,"editsection":0,"editsectiononrightclick":0,"enotifminoredits":0,"enotifrevealaddr":0,"enotifusertalkpages":1,"enotifwatchlistpages":0,"extendwatchlist":0,"externaldiff":0,"externaleditor":0,"fancysig":0,"forceeditsummary":0,"gender":"unknown","hideminor":0,"hidepatrolled":0,"imagesize":2,"justify":0,"math":1,"minordefault":0,"newpageshidepatrolled":0,"nocache":0,"noconvertlink":0,"norollbackdiff":0,"numberheadings":0,"previewonfirst":0,"previewontop":1,"quickbar":5,"rcdays":7,"rclimit":50,"rememberpassword":0,"rows":25,"searchlimit":20,"showhiddencats":0,"showjumplinks":1,"shownumberswatching":1,"showtoc":0,"showtoolbar":1,"skin":"cppreference2","stubthreshold":0,"thumbsize":2,"underline":2,"uselivepreview":0,"usenewrc":0,"watchcreations":0,"watchdefault":0,"watchdeletion":0,
"watchlistdays":3,"watchlisthideanons":0,"watchlisthidebots":0,"watchlisthideliu":0,"watchlisthideminor":0,"watchlisthideown":0,"watchlisthidepatrolled":0,"watchmoves":0,"wllimit":250,"variant":"zh","language":"zh","searchNs0":true,"searchNs1":false,"searchNs2":false,"searchNs3":false,"searchNs4":false,"searchNs5":false,"searchNs6":false,"searchNs7":false,"searchNs8":false,"searchNs9":false,"searchNs10":false,"searchNs11":false,"searchNs12":false,"searchNs13":false,"searchNs14":false,"searchNs15":false,"gadget-MathJax":1,"gadget-ColiruCompiler":1});;},{},{});mw.loader.implement("user.tokens",function(){mw.user.tokens.set({"editToken":"+\\","patrolToken":false,"watchToken":false});;},{},{});
/* cache key: mwiki1-mwiki_zh_:resourceloader:filter:minify-js:7:258d7cd6aa9aa67dee25e01fb6a9e505 */
}</script>
<script>if(window.mw){
mw.loader.load(["mediawiki.page.startup","mediawiki.legacy.wikibits","mediawiki.legacy.ajax"]);
}</script>
<!--[if lt IE 7]><style type="text/css">body{behavior:url("/mwiki/skins/cppreference2/csshover.min.htc")}</style><![endif]--></head>
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-cpp_language_exceptions skin-cppreference2 action-view cpp-navbar">
        <!-- header -->
        <!-- /header -->
        <!-- content -->
<div id="cpp-content-base">
            <div id="content">
                <a id="top"></a>
                <div id="mw-js-message" style="display:none;"></div>
                                <!-- firstHeading -->
<h1 id="firstHeading" class="firstHeading">异常</h1>
                <!-- /firstHeading -->
                <!-- bodyContent -->
                <div id="bodyContent">
                                        <!-- tagline -->
                    <div id="siteSub">来自cppreference.com</div>
                    <!-- /tagline -->
                                        <!-- subtitle -->
                    <div id="contentSub"><span class="subpages">&lt; <a href="../../cpp.html" title="cpp">cpp</a>‎ | <a href="../language.html" title="cpp/language">language</a></span></div>
                    <!-- /subtitle -->
                                                            <!-- bodycontent -->
                    <div id="mw-content-text" lang="zh" dir="ltr" class="mw-content-ltr"><div class="t-navbar" style=""><div class="t-navbar-sep"> </div><div class="t-navbar-head"><a href="../../cpp.html" title="cpp"> C++</a><div class="t-navbar-menu"><div><div><table class="t-nv-begin" cellpadding="0" style="line-height:1.1em;">
<tr class="t-nv"><td colspan="5"> <a href="../language.html" title="cpp/language">语言</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../header.html" title="cpp/header">标准库头文件</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../freestanding.html" title="cpp/freestanding"> 自立与有宿主实现</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../named_req.html" title="cpp/named req">具名要求</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../utility.html#.E8.AF.AD.E8.A8.80.E6.94.AF.E6.8C.81" title="cpp/utility">语言支持库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../concepts.html" title="cpp/concepts">概念库</a> <span class="t-mark-rev t-since-cxx20">(C++20)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../error.html" title="cpp/error">诊断库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../utility.html" title="cpp/utility">工具库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../string.html" title="cpp/string">字符串库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="https://zh.cppreference.com/w/cpp/container" title="cpp/container">容器库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../iterator.html" title="cpp/iterator">迭代器库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../ranges.html" title="cpp/ranges"> 范围库</a> <span class="t-mark-rev t-since-cxx20">(C++20)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../algorithm.html" title="cpp/algorithm">算法库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../numeric.html" title="cpp/numeric">数值库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../io.html" title="cpp/io">输入/输出库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../locale.html" title="cpp/locale">本地化库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../regex.html" title="cpp/regex">正则表达式库</a> <span class="t-mark-rev t-since-cxx11">(C++11)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../atomic.html" title="cpp/atomic">原子操作库</a> <span class="t-mark-rev t-since-cxx11">(C++11)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../thread.html" title="cpp/thread">线程支持库</a> <span class="t-mark-rev t-since-cxx11">(C++11)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../filesystem.html" title="cpp/filesystem">文件系统库</a> <span class="t-mark-rev t-since-cxx17">(C++17)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../experimental.html" title="cpp/experimental">技术规范</a> </td></tr>
</table></div><div></div></div></div></div><div class="t-navbar-sep"> </div><div class="t-navbar-head"><a href="../language.html" title="cpp/language">C++ 语言</a></div><div class="t-navbar-sep"> </div><div class="t-navbar-head"><strong class="selflink">异常</strong><div class="t-navbar-menu"><div><div style="display:inline-block">
<div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="throw.html" title="cpp/language/throw">throw 表达式</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="function-try-block.html" title="cpp/language/function-try-block">函数 try 块</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="try_catch.html" title="cpp/language/try catch">try/catch 块</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="noexcept_spec.html" title="cpp/language/noexcept spec">noexcept 说明符</a><span class="t-mark-rev t-since-cxx11">(C++11)</span></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="noexcept.html" title="cpp/language/noexcept">noexcept 运算符</a><span class="t-mark-rev t-since-cxx11">(C++11)</span></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="except_spec.html" title="cpp/language/except spec">动态异常说明</a><span class="t-mark-rev t-until-cxx20">(C++20 前)</span></td></tr>
</table></div>
</div><div></div></div></div></div><div class="t-navbar-sep"> </div></div>
<p>异常处理提供了一种方法，其可使程序从执行的某点，将控制流和信息转移到与执行先前经过的某点相关联的处理代码（换言之，异常处理将控制权沿调用栈向上转移）。
</p><p><a href="throw.html" title="cpp/language/throw">throw 表达式</a>、<a href="dynamic_cast.html" title="cpp/language/dynamic cast">dynamic_cast</a>、<a href="typeid.html" title="cpp/language/typeid">typeid</a>、<a href="new.html" title="cpp/language/new">new 表达式</a>、<a href="../memory/new/operator_new.html" title="cpp/memory/new/operator new">分配函数</a>，以及专门用来抛出特定异常以指示特定错误状态的任何标准库函数（例如 <span class="t-lc"><a href="../container/vector/at.html" title="cpp/container/vector/at">std::vector::at</a></span>、<span class="t-lc"><a href="../string/basic_string/substr.html" title="cpp/string/basic string/substr">std::string::substr</a></span> 等），都可以抛出异常。
</p><p>为捕获异常，throw 表达式必须处于 <a href="try_catch.html" title="cpp/language/try catch">try 块</a>之中，或处于 try 块中所调用的函数之中，而且必须有与异常对象的类型相匹配的 <a href="try_catch.html" title="cpp/language/try catch">catch 子句</a>。
</p><p>在声明函数时，可以提供<a href="except_spec.html" title="cpp/language/except spec">异常说明</a>和 <a href="noexcept_spec.html" title="cpp/language/noexcept spec">noexcept 说明符</a>，以限制函数能够抛出的异常类型。
</p><p>异常处理过程中发生的错误由 <span class="t-lc"><a href="../error/terminate.html" title="cpp/error/terminate">std::terminate</a></span><span class="t-rev-inl t-until-cxx17"><span> 和 <span class="t-lc"><a href="../error/unexpected.html" title="cpp/error/unexpected">std::unexpected</a></span></span> <span><span class="t-mark-rev t-until-cxx17">(C++17 前)</span></span></span> 处理。
</p>
<h3><span class="mw-headline" id=".E7.94.A8.E6.B3.95">用法</span></h3>
<p>尽管 throw 表达式用于控制转移到执行栈上方的任意代码块时没有条件限制（类似 <span class="t-lc"><a href="../utility/program/longjmp.html" title="cpp/utility/program/longjmp">std::longjmp</a></span>），但其预期用途还是进行错误处理。 
</p>
<h4><span class="mw-headline" id=".E9.94.99.E8.AF.AF.E5.A4.84.E7.90.86">错误处理</span></h4>
<p>异常的抛出用于从函数中为错误发信号，其中“错误”通常仅限于以下内容<sup id="cite_ref-1" class="reference"><a href="exceptions.html#cite_note-1">[1]</a></sup><sup id="cite_ref-2" class="reference"><a href="exceptions.html#cite_note-2">[2]</a></sup><sup id="cite_ref-3" class="reference"><a href="exceptions.html#cite_note-3">[3]</a></sup>：
</p>
<ol><li> 无法满足后置条件，例如不能产生有效的返回值对象
</li><li> 无法满足另一个必须调用的函数的前置条件
</li><li> （对于非私有成员函数）无法（再）建立类不变量
</li></ol>
<p>这意味着构造函数（参阅 <a href="raii.html" title="cpp/language/raii">RAII</a>）和大多数运算符应该通过抛出异常来报告程序错误。
</p><p>另外，所谓<i>宽契约（wide contract）</i>函数用异常来指示非法输入，例如，<span class="t-lc"><a href="../string/basic_string/at.html" title="cpp/string/basic string/at">std::string::at</a></span> 没有前置条件，但其抛出异常以指示下标越界。
</p>
<h4><span class="mw-headline" id=".E5.BC.82.E5.B8.B8.E5.AE.89.E5.85.A8">异常安全</span></h4>
<p>在函数报告了错误状态后，应该提供附加保证以保障程序的状态。以下是四个被广泛认可的异常保证等级<sup id="cite_ref-4" class="reference"><a href="exceptions.html#cite_note-4">[4]</a></sup><sup id="cite_ref-5" class="reference"><a href="exceptions.html#cite_note-5">[5]</a></sup><sup id="cite_ref-6" class="reference"><a href="exceptions.html#cite_note-6">[6]</a></sup>，每个是另一个的严格超集：
</p>
<ol><li> <i>不抛出（nothrow）（或不失败）异常保证</i>——函数始终不抛出异常。<a href="destructor.html" title="cpp/language/destructor">析构函数</a>和其他可能在栈回溯中调用的函数被期待为不抛出（以其他方式报告或隐瞒错误）。<span class="t-rev-inl t-since-cxx11"><span><a href="destructor.html" title="cpp/language/destructor">析构函数</a>默认为 <a href="noexcept.html" title="cpp/language/noexcept">noexcept</a>。</span> <span><span class="t-mark-rev t-since-cxx11">(C++11 起)</span></span></span>交换函数（swap），<a href="move_constructor.html" title="cpp/language/move constructor">移动构造函数</a>，及为提供强异常保证所使用的其他函数，都被期待为不失败（函数总是成功）。
</li><li> <i>强（strong）异常保证</i>——若函数抛出异常，则程序的状态会恰好被回滚到该函数调用前的状态。（例如 <span class="t-lc"><a href="../container/vector/push_back.html" title="cpp/container/vector/push back">std::vector::push_back</a></span>）
</li><li> <i>基础（basic）异常保证</i>——若函数抛出异常，则程序处于某个有效状态。不泄漏资源，而所有对象的不变式都保持完好。
</li><li> <i>无异常保证</i>——若函数抛出异常，则程序可能并不处于有效的状态：可能已经发生了资源泄漏、内存损坏，或其他摧毁不变式的错误。
</li></ol>
<p>此外，泛型组件还可提供<i>异常中性（exception neutral）保证</i>：若从某个模板形参（例如从 <span class="t-lc"><a href="../algorithm/sort.html" title="cpp/algorithm/sort">std::sort</a></span> 的 <code>Compare</code> 函数对象，或从 <span class="t-lc"><a href="../memory/shared_ptr/make_shared.html" title="cpp/memory/shared ptr/make shared">std::make_shared</a></span> 中 <code>T</code> 的构造函数）抛出异常，则它被无修改地传播给调用方。
</p>
<h3><span class="mw-headline" id=".E5.BC.82.E5.B8.B8.E5.AF.B9.E8.B1.A1">异常对象</span></h3>
<p>虽然任何完整类型和指向 void 的 cv 指针都能作为异常对象抛出，但所有标准库函数都以值抛出匿名临时对象，而且这些对象的类型都（直接或间接）派生于 <span class="t-lc"><a href="../error/exception.html" title="cpp/error/exception">std::exception</a></span>。用户定义的异常通常遵循此模式。<sup id="cite_ref-7" class="reference"><a href="exceptions.html#cite_note-7">[7]</a></sup><sup id="cite_ref-8" class="reference"><a href="exceptions.html#cite_note-8">[8]</a></sup><sup id="cite_ref-9" class="reference"><a href="exceptions.html#cite_note-9">[9]</a></sup>
</p><p>为避免不必要的异常对象复制和对象切片，catch 子句在实际中最好引用捕捉。<sup id="cite_ref-10" class="reference"><a href="exceptions.html#cite_note-10">[10]</a></sup><sup id="cite_ref-11" class="reference"><a href="exceptions.html#cite_note-11">[11]</a></sup><sup id="cite_ref-12" class="reference"><a href="exceptions.html#cite_note-12">[12]</a></sup><sup id="cite_ref-13" class="reference"><a href="exceptions.html#cite_note-13">[13]</a></sup>
</p>
<h3><span class="mw-headline" id=".E5.BC.95.E7.94.A8">引用</span></h3>
<ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><a href="exceptions.html#cite_ref-1">↑</a></span> <span class="reference-text">H. Sutter (2004) <a rel="nofollow" class="external text" href="http://www.drdobbs.com/when-and-how-to-use-exceptions/184401836">“何时及如何使用异常”</a>于 Dr. Dobb's</span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><a href="exceptions.html#cite_ref-2">↑</a></span> <span class="reference-text">H.Sutter, A. Alexandrescu (2004)，“C++ 编码标准”，第 70 条</span>
</li>
<li id="cite_note-3"><span class="mw-cite-backlink"><a href="exceptions.html#cite_ref-3">↑</a></span> <span class="reference-text">C++ 核心指导方针
<a rel="nofollow" class="external text" href="https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#i10-use-exceptions-to-signal-a-failure-to-perform-a-required-task">I.10</a></span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><a href="exceptions.html#cite_ref-4">↑</a></span> <span class="reference-text">B. Stroustrup (2000)，“C++ 程序语言” <a rel="nofollow" class="external text" href="http://stroustrup.com/3rd_safe.pdf">“附录 E”</a></span>
</li>
<li id="cite_note-5"><span class="mw-cite-backlink"><a href="exceptions.html#cite_ref-5">↑</a></span> <span class="reference-text">H. Sutter (2000) “Exceptional C++”</span>
</li>
<li id="cite_note-6"><span class="mw-cite-backlink"><a href="exceptions.html#cite_ref-6">↑</a></span> <span class="reference-text">D. Abrahams (2001) <a rel="nofollow" class="external text" href="http://www.boost.org/community/exception_safety.html">“泛型组件中的异常安全”</a></span>
</li>
<li id="cite_note-7"><span class="mw-cite-backlink"><a href="exceptions.html#cite_ref-7">↑</a></span> <span class="reference-text">D. Abrahams (2001) <a rel="nofollow" class="external text" href="http://www.boost.org/community/error_handling.html">“错误与异常处理”</a></span>
</li>
<li id="cite_note-8"><span class="mw-cite-backlink"><a href="exceptions.html#cite_ref-8">↑</a></span> <span class="reference-text">isocpp.org Super-FAQ <a rel="nofollow" class="external text" href="https://isocpp.org/wiki/faq/exceptions#what-to-throw">“我应该抛出什么？”</a></span>
</li>
<li id="cite_note-9"><span class="mw-cite-backlink"><a href="exceptions.html#cite_ref-9">↑</a></span> <span class="reference-text">C++ 核心指导方针 <a rel="nofollow" class="external text" href="https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#e14-use-purpose-designed-user-defined-types-as-exceptions-not-built-in-types">E.14</a></span>
</li>
<li id="cite_note-10"><span class="mw-cite-backlink"><a href="exceptions.html#cite_ref-10">↑</a></span> <span class="reference-text">C++ 核心指导方针 <a rel="nofollow" class="external text" href="https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#e15-catch-exceptions-from-a-hierarchy-by-reference">E.15</a></span>
</li>
<li id="cite_note-11"><span class="mw-cite-backlink"><a href="exceptions.html#cite_ref-11">↑</a></span> <span class="reference-text">S. Meyers (1996) “More Effective C++” 第 13 条</span>
</li>
<li id="cite_note-12"><span class="mw-cite-backlink"><a href="exceptions.html#cite_ref-12">↑</a></span> <span class="reference-text">isocpp.org 超级 FAQ <a rel="nofollow" class="external text" href="https://isocpp.org/wiki/faq/exceptions#what-to-catch">“我应该捕捉什么？”</a></span>
</li>
<li id="cite_note-13"><span class="mw-cite-backlink"><a href="exceptions.html#cite_ref-13">↑</a></span> <span class="reference-text">H.Sutter, A. Alexandrescu (2004) “C++ 编码标准” 第 73 条</span>
</li>
</ol>

<!-- 
NewPP limit report
Preprocessor visited node count: 1184/1000000
Preprocessor generated node count: 3794/1000000
Post‐expand include size: 25285/2097152 bytes
Template argument size: 2950/2097152 bytes
Highest expansion depth: 15/40
Expensive parser function count: 0/100
-->

<!-- Saved in parser cache with key mwiki1-mwiki_zh_:pcache:idhash:8568-0!*!0!!zh!*!zh!* and timestamp 20200219095027 -->
</div>                    <!-- /bodycontent -->
                                        <!-- printfooter -->
                    <div class="printfooter">
                    来自“<a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/language/exceptions&amp;oldid=64872">https://zh.cppreference.com/mwiki/index.php?title=cpp/language/exceptions&amp;oldid=64872</a>”                    </div>
                    <!-- /printfooter -->
                                                            <!-- catlinks -->
                    <!-- /catlinks -->
                                                            <div class="visualClear"></div>
                    <!-- debughtml -->
                                        <!-- /debughtml -->
                </div>
                <!-- /bodyContent -->
            </div>
        </div>
        <!-- /content -->
        <!-- footer -->
        <div id="cpp-footer-base" class="noprint">
            <div id="footer">
                        <div id="cpp-navigation">
            <h5>导航</h5>
            <ul><li><a href="https://zh.cppreference.com/w/cpp/language/exceptions">Online version</a></li><li>Offline version retrieved 2020-03-14 18:00.</li></ul></div>
                        <ul id="footer-info">
                                    <li id="footer-info-lastmod"> 本页面最后修改于2020年2月19日 (星期三) 01:50。</li>
                                    <li id="footer-info-viewcount">此页面已被浏览过11,556次。</li>
                            </ul>
                    </div>
        </div>
        <!-- /footer -->
        <script>if(window.mw){
mw.loader.state({"site":"loading","user":"missing","user.groups":"ready"});
}</script>
<script src="../../../common/skin_scripts.js"></script>
<script>if(window.mw){
mw.loader.load(["mediawiki.action.view.postEdit","mediawiki.user","mediawiki.page.ready","mediawiki.searchSuggest","mediawiki.hidpi","ext.gadget.MathJax","ext.gadget.ColiruCompiler"], null, true);
}</script>
<script src="../../../common/site_scripts.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-2828341-1']);
_gaq.push(['_setDomainName', 'cppreference.com']);
_gaq.push(['_trackPageview']);
</script><!-- Served in 0.097 secs. -->
	</body>
<!-- Cached 20200219205443 -->
</html>